{extend name="base" /}
{block name="content"}
<script src="__STATIC__/public/My97DatePicker/WdatePicker.js"></script>
<div class="g-main">
    <div class="m-main-title">
        <div class="m-container-fluid">
            <a href="{:url('index/welcome')}"><i class="icon icon-home"></i>首页</a>
            <span class="icon-angle-right"></span>
            <span>系统</span>
            <span class="icon-angle-right"></span>
            <span>会员管理</span>
            <span class="icon-angle-right"></span>
            <span>{$info ? '编辑' : '添加'}会员</span>
            <a class="u-flush"><i class="icon-repeat"></i></a>
        </div>
    </div>
    <div class="m-main-content">
        <div class="m-container">
            <div class="m-form">
                <form class="layui-form" id="j_form">
                    <table class="m-table">
                        <thead>
                            <tr>
                                <th colspan="2">{$info ? '编辑' : '添加'}会员</th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr>
                                <td width="15%"><label for="username">姓名</label></td>
                                <td><input type="text" class="u-ipt u-ipt-small" name="username" id="username" placeholder="请输入用户姓名"  value="{$info.username}" /></td>
                            </tr>
                            <tr>
                                <td width="15%"><label for="username">手机号</label></td>
                                <td><input type="text" class="u-ipt u-ipt-small" name="mobile" id="mobile" placeholder="请输入用户手机号"  value="{$info.mobile}" /></td>
                            </tr>
                            <tr>
                                <td width="15%"><label for="username">生日日期</label></td>
                                <td><input type="text" name="birthday" class="u-ipt u-ipt-small" placeholder="生日日期" value="{$info.birthday ?: ''}" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd '})" readonly /></td>

                            </tr>
                            <tr >
                                <td><label for="points">积分</label></td>
                                <td><input type="text" class="u-ipt u-ipt-small" name="points" id="points" placeholder="请输入用户积分"  value="{$info.points}" /></td>
                            </tr>

                            <tr style="display: none">
                                <td><label for="">会员审核状态</label></td>
                                <td><div class="lay-checked"><input type="checkbox" name="checked" value="1" title="审核通过" lay-skin="primary"{$info.checked ? ' checked' : ''} /></div></td>
                            </tr>
                            <tr hidden>
                                <td><label for="">会员启用状态</label></td>
                                <td>
                                    <input type="radio" name="status" value="1" title="启用"{if condition="!$info || $info['status'] eq 1"} checked{/if} />
                                    <input type="radio" name="status" value="0" title="禁用"{if condition="$info && $info['status'] eq 0"} checked{/if} />
                                </td>
                            </tr>
                        </tbody>

                    </table>
                    <div class="m-form-btn"><input type="hidden" name="id" value="{$info.id}"><button id="j_btn" class="u-btn">确定提交</button></div>
                </form>
            </div>
        </div>
    </div>
</div>
{/block}
{block name="extrajs"}
<script src="__STATIC__/public/js/jquery-ui.min.js"></script>
{include file="public:upload"/}
{include file="public:editor"/}
<script>
    layui.use(['layer', 'form', 'upload'], function(){
        var form   = layui.form;
        var upload = layui.upload;

    });
</script>
{/block}